// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "Engine/DeveloperSettingsBackedByCVars.h"

#include "LyraCosmeticDeveloperSettings.generated.h"

struct FLyraCharacterPart;
struct FPropertyChangedEvent;

class ULyraExperienceDefinition;

// 化妆作弊模式枚举
UENUM()
enum class ECosmeticCheatMode
{
	ReplaceParts, // 替换部件

	AddParts // 添加部件
};

/**
 * 化妆开发者设置 / 编辑器作弊
 */
UCLASS(config=EditorPerProjectUserSettings, MinimalAPI)
class ULyraCosmeticDeveloperSettings : public UDeveloperSettingsBackedByCVars
{
	GENERATED_BODY()

public:
	ULyraCosmeticDeveloperSettings();

	//~UDeveloperSettings 接口
	virtual FName GetCategoryName() const override;
	//~UDeveloperSettings 接口结束

public:
	UPROPERTY(Transient, EditAnywhere)
	TArray<FLyraCharacterPart> CheatCosmeticCharacterParts; // 作弊化妆角色部件列表

	UPROPERTY(Transient, EditAnywhere)
	ECosmeticCheatMode CheatMode; // 作弊模式

#if WITH_EDITOR
public:
	// 由编辑器引擎调用，以便在作弊激活时弹出提醒通知
	LYRAGAME_API void OnPlayInEditorStarted() const;

private:
	void ApplySettings();
	void ReapplyLoadoutIfInPIE();
#endif

public:
	//~UObject 接口
#if WITH_EDITOR
	virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
	virtual void PostReloadConfig(FProperty* PropertyThatWasLoaded) override;
	virtual void PostInitProperties() override;
#endif
	//~UObject 接口结束

private:


};